<template>
	<view class="content">
		<Search></Search>
		<view v-for="(item,index) in list" :key="index" class="cover">
			<image :src="item.coverImgUrl" mode="widthFix"></image>
			<view>
				<text v-for="(count,i) in item.tracks" :key="i">{{i+1}}.{{count.first}}-{{count.second}}</text> 
			</view>
		</view>
	</view>
</template>

<script>
	import {getAbstract} from "../../tools/ajax.js"
	import Search from "../../components/Search/Search.vue"
	
	export default {
		// name: 'index',
		data() {
			return {
				list: []
			}
		},
		components: {
			Search
		},
		onLoad() {
			getAbstract().then(res=>{
				this.list = res.list.splice(0,4)
			})
		},
		methods: {
			
		}
	}
</script>

<style>
	.content {
		/* display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center; */
	}

	.cover{
		height: 200rpx;
		overflow: hidden;
		margin-top: 30rpx;
		padding: 0 20rpx;
	}
	.cover image{
		width: 200rpx;
		display: inline-block;
		border-radius: 20rpx;
	}
	.cover>view{
		display: inline-block;
		width: 500rpx;
	}
	.content>view>text{
		display: block;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}
	
</style>
